import request from "@/utils/http";
export const getUserAPI = (user, passwd) => {
  return request({
    url: `/users?username=${user}&password=${passwd}`,
  });
};
export const postUserAPI = (user, passwd) => {
  return request({
    url: "/users",
    method: "POST",
    data: {
      username: user,
      password: passwd,
    },
  });
};
export const getImgUrlAPI = () => {
  return request({
    url: `/imageURL`,
  });
};

export const getMyteachAPI = () => {
  return request({
    url: `/myteach`,
  });
};
export const patchMyteachAPI = (index, content) => {
  return request({
    url: `/myteach/${index}`,
    method: "PATCH",
    data: {
      arr: content,
    },
  });
};
